package org.example;

import javax.swing.*;
import java.awt.*;

public class MainPanel extends JPanel {
    private One one;
    private Two two;
    private Three three;
    private Four four;

    public MainPanel(MainFrame mainFrame) {
        this.addContent(mainFrame);
    }

    private void addContent(MainFrame mainFrame) {
        this.one = new One(mainFrame);
        this.two = new Two();
        this.three = new Three();
        this.four = new Four();

        this.setLayout(new CardLayout());
        this.add("1", this.one);
        this.add("2", this.two);
        this.add("3", this.three);
        this.add("4", this.four);
    }

    public One getOne() {
        return one;
    }

    public void setOne(One one) {
        this.one = one;
    }

    public Two getTwo() {
        return two;
    }

    public void setTwo(Two two) {
        this.two = two;
    }

    public Three getThree() {
        return three;
    }

    public void setThree(Three three) {
        this.three = three;
    }

    public Four getFour() {
        return four;
    }

    public void setFour(Four four) {
        this.four = four;
    }
}
